class Solution(object):
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        if x < 0:
            return False
        else:
            str_x = str(x)[:]
            #先判断不相等，若有一位不等即返回fasle，等遍历完整个数组即返回true
            # for i in range(len(str_x)):     #len =3;   (0, 1, 2)
            #                if str_x[i] == str_x[len(str_x) - 1 - i]:
            #                    return True
            #                else:
            #                    return False
            for i in range(len(str_x)):     #len =3;   (0, 1, 2)
                if str_x[i] != str_x[len(str_x) - 1 - i]:
                    return False
            return True
def main():
    x = int(input('x = '))
    x_bool = Solution().isPalindrome(x)
    print(x_bool)

if __name__ =='__main__':
    main()

